.role {
  top: 0;
  width: 100%;
  height: 100vh;
  position: relative;
  background-color: #f5f5f5;
  color: #333;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 角色列表样式 */
.role-header {
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.role-header h2 {
  margin: 0;
  font-size: 24px;
  color: #333;
}

.role-list {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.role-item {
  background-color: #fff;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.role-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.role-info {
  flex: 1;
}

.role-info h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #333;
}

.role-info p {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* 对话详情样式 */
.conversation-header {
  padding: 16px 20px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 20px;
}

.conversation-header h2 {
  margin: 0;
  font-size: 20px;
  color: #333;
  flex: 1;
}

.conversation-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.character-details {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.details-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.details-info h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.details-info p {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.message-list {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  max-height: 400px;
  overflow-y: auto;
}

.message-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.message-sent {
  flex-direction: row-reverse;
}

.message-sent .message-content {
  background-color: #e6f7ff;
  border-radius: 8px 0 8px 8px;
}

.message-received .message-content {
  background-color: #f0f0f0;
  border-radius: 0 8px 8px 8px;
}

.message-content {
  max-width: 70%;
  padding: 12px 16px;
  word-wrap: break-word;
}

.message-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .role-item {
    padding: 12px;
  }
  
  .role-info h3 {
    font-size: 16px;
  }
  
  .character-details {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .message-content {
    max-width: 85%;
  }
}
